package com.burges.net.dataSet.api.transform

import org.apache.flink.api.scala.{CrossDataSet, ExecutionEnvironment}

/**
  * 创建人    BurgessLee 
  * 创建时间   2020/2/11 
  * 描述      cross算子操作
  */
object CrossOperatorDemo {

	def main(args: Array[String]): Unit = {
		val environment = ExecutionEnvironment.getExecutionEnvironment
		val dataset1 = environment.fromElements((12, "flink"),(12, "flink"),(12, "flink"))
		val dataset2 = environment.fromElements("flink")
		// 不指定cross function 返回Tuple，左边数据集类型，右边数据集
		val crossDataSet: CrossDataSet[(Int, String), String] = dataset1.cross(dataset2)
	}

}
